package main

import (
	"github.com/gin-gonic/gin"
	"next-vue-backend/middleware"
	"next-vue-backend/model"
	"next-vue-backend/router"
	"next-vue-backend/utils"
)

func main () {
	gin.SetMode(utils.AppMode)

	// 创建gin引擎
	g := gin.New()

	// 自定义日志
	g.Use(middleware.Logger())

	// 初始化数据库
	model.InitDb()

	// 初始化路由
	router.InitRouter(g)
}